Imports DocumentFormat.OpenXml.Spreadsheet
Imports FineUI
Imports Kimmo
Imports Microsoft.VisualBasic.CompilerServices
Imports System.Collections
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlServerCe
Imports System.Diagnostics
Imports System.Runtime.CompilerServices

''' <summary>
''' This is the beginning of the Project_Dependencies business object to handle interaction between the user interface and the database.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Class clsProjectDependencies
    Public Property Id As String = ""
    Public Property InfrastructureTypeId As Integer = 0
    Public Property InfrastructureTypeName As String = ""
    Public Property Description As String = ""
    Public Property LeaderEntity As String = ""
    Public Property Budget As String = ""
    Public Property FundingStatus As String = ""
    Public Property ProjectId As Integer = 0
    Public Property IsNew As Boolean = False
    Public Property DateFields As String = ""
    Public Property FieldsToUpdate As String = "Id,InfrastructureTypeId,InfrastructureTypeName,Description,LeaderEntity,Budget,FundingStatus,ProjectId"

''' <summary>
''' The new method of the class to create new Project_Dependencies records.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Sub New()
    MyBase.New()
    Clear()
    IsNew = True
    DateFields = ""
    FieldsToUpdate = "Id,InfrastructureTypeId,InfrastructureTypeName,Description,LeaderEntity,Budget,FundingStatus,ProjectId"
End Sub

''' <summary>
''' The Clear method clears all properties of the business object to defaults.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Sub Clear()
    Id = ""
    InfrastructureTypeId = 0
    InfrastructureTypeName = ""
    Description = ""
    LeaderEntity = ""
    Budget = ""
    FundingStatus = ""
    ProjectId = 0
End Sub

''' <summary>
''' Delete Project_Dependencies records specified by a list of ID.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Sub Delete(ByRef Records As List(Of String))
        For Each rsStr As String In Records
            SQLCompact.RunQuery("delete from [Project_Dependencies] where ID = " & rsStr, True)
        Next
    End Sub


''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteById(ByVal strId As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Id] = '" & strId & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfId(ByRef Records As List(Of String))
        For Each strId As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Id] = '" & strId & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [InfrastructureTypeId] = " & intInfrastructureTypeId)
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfInfrastructureTypeId(ByRef Records As List(Of String))
        For Each intInfrastructureTypeId As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [InfrastructureTypeId] = " & intInfrastructureTypeId)
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByInfrastructureTypeName(ByVal strInfrastructureTypeName As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [InfrastructureTypeName] = '" & strInfrastructureTypeName & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfInfrastructureTypeName(ByRef Records As List(Of String))
        For Each strInfrastructureTypeName As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [InfrastructureTypeName] = '" & strInfrastructureTypeName & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByDescription(ByVal strDescription As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Description] = '" & strDescription & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfDescription(ByRef Records As List(Of String))
        For Each strDescription As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Description] = '" & strDescription & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByLeaderEntity(ByVal strLeaderEntity As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [LeaderEntity] = '" & strLeaderEntity & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfLeaderEntity(ByRef Records As List(Of String))
        For Each strLeaderEntity As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [LeaderEntity] = '" & strLeaderEntity & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByBudget(ByVal strBudget As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Budget] = '" & strBudget & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfBudget(ByRef Records As List(Of String))
        For Each strBudget As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [Budget] = '" & strBudget & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByFundingStatus(ByVal strFundingStatus As String)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [FundingStatus] = '" & strFundingStatus & "'")
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfFundingStatus(ByRef Records As List(Of String))
        For Each strFundingStatus As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [FundingStatus] = '" & strFundingStatus & "'")
        Next
End Sub

''' <summary>
''' Delete Project_Dependencies records meeting a particular field name criteria. In this case, ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByProjectId(ByVal intProjectId As Integer)
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [ProjectId] = " & intProjectId)
End Sub

''' <summary>
''' Delete Project_Dependencies records from a list of particular field. In this case, ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub DeleteByListOfProjectId(ByRef Records As List(Of String))
        For Each intProjectId As String In Records
    SQLCompact.RunQuery("Delete from [Project_Dependencies] where [ProjectId] = " & intProjectId)
        Next
End Sub

''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "Id", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdById(ByVal strId As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "Id", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusById(ByVal strId As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Id based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function IdByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "Id", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdById(ByVal strId As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Id", strId, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "InfrastructureTypeId", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "InfrastructureTypeName", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByDescription(ByVal strDescription As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "Description", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByLeaderEntity(ByVal strLeaderEntity As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "LeaderEntity", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByBudget(ByVal strBudget As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "Budget", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByFundingStatus(ByVal strFundingStatus As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "InfrastructureTypeId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "FundingStatus", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeId based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeIdByProjectId(ByVal intProjectId As Integer) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "InfrastructureTypeId", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "ProjectId", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "InfrastructureTypeName", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.InfrastructureTypeName based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function InfrastructureTypeNameByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "InfrastructureTypeName", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "Description", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByDescription(ByVal strDescription As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Description based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function DescriptionByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "Description", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByDescription(ByVal strDescription As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Description", strDescription, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "LeaderEntity", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByLeaderEntity(ByVal strLeaderEntity As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.LeaderEntity based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function LeaderEntityByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "LeaderEntity", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByLeaderEntity(ByVal strLeaderEntity As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "LeaderEntity", strLeaderEntity, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "Budget", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByBudget(ByVal strBudget As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.Budget based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function BudgetByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "Budget", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByBudget(ByVal strBudget As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "Budget", strBudget, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByFundingStatus(ByVal strFundingStatus As String) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "FundingStatus", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.FundingStatus based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function FundingStatusByProjectId(ByVal intProjectId As Integer) As String
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "FundingStatus", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return mv
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByFundingStatus(ByVal strFundingStatus As String) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "FundingStatus", strFundingStatus, "ProjectId", ";", "String")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return a particular field based on another field. In this case return Project_Dependencies.ProjectId based on Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ProjectIdByProjectId(ByVal intProjectId As Integer) As Integer
    Dim mv As String = SQLCompact.RecordReadToMv("Project_Dependencies", "ProjectId", intProjectId, "ProjectId", ";", "Integer")
    mv = clsDL.MvField(mv, 1, ";")
    Return Val(mv)
End Function


''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function IdList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "Id", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function InfrastructureTypeIdList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "InfrastructureTypeId", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function InfrastructureTypeNameList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "InfrastructureTypeName", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function DescriptionList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "Description", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function LeaderEntityList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "LeaderEntity", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function BudgetList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "Budget", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function FundingStatusList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "FundingStatus", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the list of strings of a particular field. In this case Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
    Public Shared Function ProjectIdList(Optional bAddNone As Boolean = False, Optional bIsDate As Boolean = False, Optional FldDelim As String = ";") As List(Of String)
        Dim strs As List(Of String) = SQLCompact.TableDistinctList("Project_Dependencies", "ProjectId", "{0}", bAddNone, bIsDate, FldDelim)
        Return strs
    End Function

''' <summary>
''' Return the total number of records in the table Project_Dependencies
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function Count() As Integer
Dim nRecords As Integer = 0
Dim dt As DataTable = SQLCompact.OpenDataTable("select Count(ID) as Records from [Project_Dependencies]")
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function


''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountById(ByVal strId As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [Id] = '" & strId & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [InfrastructureTypeId] = " & intInfrastructureTypeId
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [InfrastructureTypeName] = '" & strInfrastructureTypeName & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByDescription(ByVal strDescription As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [Description] = '" & strDescription & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByLeaderEntity(ByVal strLeaderEntity As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [LeaderEntity] = '" & strLeaderEntity & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByBudget(ByVal strBudget As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [Budget] = '" & strBudget & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByFundingStatus(ByVal strFundingStatus As String) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [FundingStatus] = '" & strFundingStatus & "'"
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return the total number of records with a particular value in a field. In this case Project_Dependencies.ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function CountByProjectId(ByVal intProjectId As Integer) As Integer
Dim sQry As String = "Select Count(ID) As Records from [Project_Dependencies] where [ProjectId] = " & intProjectId
Dim dt As DataTable = SQLCompact.OpenDataTable(sQRY)
Dim nRecords as integer = 0
For Each dr As DataRow In dt.Rows
nRecords = Val(dr("Records").ToString)
Next
Return nRecords
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function Exists(ByVal intID as Integer) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "ID", intID, "Long")
Return flag
End Function


''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on Id
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsById(ByVal strId As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "Id", strId, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on InfrastructureTypeId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByInfrastructureTypeId(ByVal intInfrastructureTypeId As Integer) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "InfrastructureTypeId", intInfrastructureTypeId, "Integer")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on InfrastructureTypeName
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByInfrastructureTypeName(ByVal strInfrastructureTypeName As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "InfrastructureTypeName", strInfrastructureTypeName, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on Description
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByDescription(ByVal strDescription As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "Description", strDescription, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on LeaderEntity
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByLeaderEntity(ByVal strLeaderEntity As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "LeaderEntity", strLeaderEntity, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on Budget
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByBudget(ByVal strBudget As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "Budget", strBudget, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on FundingStatus
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByFundingStatus(ByVal strFundingStatus As String) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "FundingStatus", strFundingStatus, "String")
Return flag
End Function

''' <summary>
''' Return True or False if a particular Project_Dependencies record exists based on ProjectId
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Function ExistsByProjectId(ByVal intProjectId As Integer) As Boolean
Dim flag As Boolean = SQLCompact.RecordExists("Project_Dependencies", "ProjectId", intProjectId, "Integer")
Return flag
End Function

''' <summary>
''' Read Method to read Project_Dependencies record from the database using a primarykey.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Sub Read(ByVal sID As String)
Try
Clear()
Dim nRead As New DataSet()
nRead = SQLCompact.RecordSeek("Project_Dependencies", "ID", sID, "*", "Integer")
Dim xCount As Boolean = nRead.Tables(0).Rows.Count - 1 <> -1
If xCount Then
Dim xRow As DataRow = nRead.Tables(0).Rows(0)
Id = xRow("Id").ToString
InfrastructureTypeId = Val(xRow("InfrastructureTypeId").ToString)
InfrastructureTypeName = xRow("InfrastructureTypeName").ToString
Description = xRow("Description").ToString
LeaderEntity = xRow("LeaderEntity").ToString
Budget = xRow("Budget").ToString
FundingStatus = xRow("FundingStatus").ToString
ProjectId = Val(xRow("ProjectId").ToString)
Me.IsNew = False
nRead.Dispose()
End If
Catch exc as Exception
Throw new Exception(exc.Message)
End Try
End Sub

''' <summary>
''' Save a Project_Dependencies record to the database using a primary key. This uses a property get and FieldsToUpdate, DateFields to update the database.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Sub Save()
Try
Dim strTable As String = "Project_Dependencies"
Dim strPriKey As String = "ID"
Dim CommText As String = ""
Dim xCommand As New SqlCeCommand
If ID = -1 Then
ID = SQLCompact.TableMaxValue(strTable, strPriKey, "") + 1
IsNew = True
Else
IsNew = False
End If
If FieldsToUpdate = "*" Then
FieldsToUpdate = SQLCompact.Table_FieldNames(strTable, False, ",")
End If
FieldsToUpdate = clsDL.MvRemoveDuplicates(Me.FieldsToUpdate, ",")
Dim strParameters As String = clsDL.MvPrefixBy(FieldsToUpdate, "@", ",")
If IsNew Then
CommText = clsDL.BuildInsertCommand(strTable, FieldsToUpdate, ",")
Else
CommText = clsDL.BuildUpdateCommand(strTable, FieldsToUpdate, strPriKey, ",")
End If
xCommand = SQLCompact.OpenCommand(CommText)
Dim spFields() As String = Split(FieldsToUpdate, ",")
With xCommand
.Parameters.Clear()
For each strField As String In spFields
Dim datePos As Integer = clsDL.MvSearch(DateFields, strField, ",")
If datePos > 0 Then
Dim strValue as string = clsDL.PropertyGet(Me, strField).ToString
.Parameters.AddWithValue("@" & strField, IIf((IsDate(strValue) = True), CDate(strValue), DBNull.Value))
Else
.Parameters.AddWithValue("@" & strField, clsDL.PropertyGet(Me, strField))
End If
Next
.ExecuteNonQuery()
End With
SQLCompact.Connection.Close()
xCommand.Dispose()
Catch exc as Exception
Throw new Exception(exc.Message)
End Try
End Sub

''' <summary>
''' This method builds up an editable grid based on selected records. The grid has Save, Clone and Delete buttons
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub ShowProject_Dependencies(ByRef grdViews As FineUI.Grid, ByVal strFilter As String)
clsFineUI.Grid.Clear(grdViews, "", "")
clsFineUI.Grid.TableName = "Project_Dependencies"
clsFineUI.Grid.DataKeyNames = "Id"
clsFineUI.Grid.PageSize = 50
clsFineUI.Grid.AllowPaging = True
clsFineUI.Grid.AllowSorting = True
clsFineUI.Grid.LoadMask = False
clsFineUI.Grid.Title = "Project_Dependencies"
clsFineUI.Grid.ShowBorder = False
clsFineUI.Grid.ShowHeader = False
clsFineUI.Grid.EnableRowNumber = False
clsFineUI.Grid.AutoHeight = True
clsFineUI.Grid.AutoPostBack = False
clsFineUI.Grid.EnableCheckBoxSelect = True
clsFineUI.Grid.AutoWidth = True
clsFineUI.Grid.EnableAlternateRowColor = True
clsFineUI.Grid.EnableCollapse = False
clsFineUI.Grid.EnableMouseOverColor = True
clsFineUI.Grid.EnableMultiSelect = True
clsFineUI.Grid.EnableViewState = True
clsFineUI.Grid.EnableAjax = True
clsFineUI.Grid.ColumnLines = True
clsFineUI.Grid.ToolTipField = ""
clsFineUI.Grid.IsDatabasePaging = False
clsFineUI.Grid.ShowGridHeader = True
clsFineUI.Grid.EnableHeaderMenu = True
clsFineUI.Grid.EnableColumnHide = True
clsFineUI.Grid.AddComboBox("FundingStatus", "Funding Status", "{0}", "", "100", FineUi.TextAlign.Left, False, Nothing)
clsFineUI.Grid.AddTextBox("Id", "Id", "{0}", "", "50", FineUi.TextAlign.Left, False, False, True)
clsFineUI.Grid.AddComboBox("InfrastructureTypeName", "Infrastructure Type Name", "{0}", "", "150", FineUi.TextAlign.Left, False, Nothing)
clsFineUI.Grid.AddTextBox("Description", "Description", "{0}", "", "200", FineUi.TextAlign.Left, False, True, True)
clsFineUI.Grid.AddTextBox("LeaderEntity", "Project Leader/Entity", "{0}", "", "150", FineUi.TextAlign.Left, False, False, True)
clsFineUI.Grid.AddTextBox("Budget", "Budget", "{0:#,##0.00}", "", "100", FineUi.TextAlign.Left, False, False, True)
clsFineUI.Grid.AddSave()
clsFineUI.Grid.AddClone()
clsFineUI.Grid.AddDelete()
If Len(strFilter) > 0 Then clsFineUI.Grid.Filter = strFilter
clsFineUI.Grid.OrderBy = "Id"
clsFineUI.Grid.BuildSelectCommand()
clsFineUI.Grid.UseSQLCompact = True
clsFineUI.Grid.Update(Nothing)
End Sub

''' <summary>
''' Builds a readonly grid based on selected records, this grid has Edit, Clone, Delete, Like and Comment buttons.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub ShowGrid(ByRef grdViews As FineUI.Grid, ByVal strFilter As String)
clsFineUI.Grid.Clear(grdViews, "", "")
clsFineUI.Grid.TableName = "Project_Dependencies"
clsFineUI.Grid.DataKeyNames = "Id"
clsFineUI.Grid.PageSize = 50
clsFineUI.Grid.AllowPaging = True
clsFineUI.Grid.AllowSorting = True
clsFineUI.Grid.LoadMask = False
clsFineUI.Grid.Title = "Project_Dependencies"
clsFineUI.Grid.ShowBorder = False
clsFineUI.Grid.ShowHeader = False
clsFineUI.Grid.EnableRowNumber = False
clsFineUI.Grid.AutoHeight = True
clsFineUI.Grid.AutoPostBack = False
clsFineUI.Grid.EnableCheckBoxSelect = True
clsFineUI.Grid.AutoWidth = True
clsFineUI.Grid.EnableAlternateRowColor = True
clsFineUI.Grid.EnableCollapse = False
clsFineUI.Grid.EnableMouseOverColor = True
clsFineUI.Grid.EnableMultiSelect = True
clsFineUI.Grid.EnableViewState = True
clsFineUI.Grid.EnableAjax = True
clsFineUI.Grid.ColumnLines = True
clsFineUI.Grid.ToolTipField = ""
clsFineUI.Grid.IsDatabasePaging = False
clsFineUI.Grid.ShowGridHeader = True
clsFineUI.Grid.EnableHeaderMenu = True
clsFineUI.Grid.EnableColumnHide = True
clsFineUI.Grid.AddColumn("FundingStatus", "Funding Status", "{0}", "", "", False, "100", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddColumn("Id", "Id", "{0}", "", "", False, "50", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddColumn("InfrastructureTypeName", "Infrastructure Type Name", "{0}", "", "", False, "150", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddColumn("Description", "Description", "{0}", "", "", False, "200", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddColumn("LeaderEntity", "Project Leader/Entity", "{0}", "", "", False, "150", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddColumn("Budget", "Budget", "{0:#,##0.00}", "", "", False, "100", FineUi.TextAlign.Left, False)
clsFineUI.Grid.AddEditCloneDelete()
clsFineUI.Grid.AddLikeComment()
If Len(strFilter) > 0 Then clsFineUI.Grid.Filter = strFilter
clsFineUI.Grid.OrderBy = "Id"
clsFineUI.Grid.BuildSelectCommand()
clsFineUI.Grid.UseSQLCompact = True
clsFineUI.Grid.Update(Nothing)
End Sub

''' <summary>
''' Import Project_Dependencies records from a csv file.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Shared Sub ImportFile(ByVal SourceFile As String, ByVal FileData As String)
Try
Dim spLines As String() = Strings.Split(FileData, vbCr & vbLf)
For each strLine As String In spLines
strLine = strLine.Trim
If Len(strLine) > 0 Then
Dim spLine As String() = Strings.Split(strLine, ",")
Dim clsNewProjectDependencies As New clsProjectDependencies
With clsNewProjectDependencies
.IsNew = True
.Id = -1
.Save
End With
End If
Next
Catch exc as exception
Throw new Exception(exc.message)
End Try
End Sub

''' <summary>
''' Define a blank Project_Dependencies record and save it in a database. This method is useful for a grid like interface.
''' </summary>
''' <remarks>This code is automatically generated by SystemBuilder.Show.</remarks>
Public Sub Blank()
Dim clsNewProjectDependencies As New clsProjectDependencies
clsNewProjectDependencies.Clear()
clsNewProjectDependencies.IsNew = True
clsNewProjectDependencies.Id = -1
clsNewProjectDependencies.Save
clsNewProjectDependencies = Nothing
End Sub
End Class

